DispatchProxy (JACOB : Java COM Bridge API Docs)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jacob.com
Class DispatchProxy

    java.lang.Object
      com.jacob.com.JacobObject
          com.jacob.com.DispatchProxy

    public class DispatchProxy

extends JacobObject

If you need to pass a COM Dispatch object between STA threads, you have to marshall the interface. This class is used as follows: the STA that creates the Dispatch object must construct an instance of this class. Another thread can then call toDispatch() on that instance and get a Dispatch pointer which has been marshalled. WARNING: You can only call toDispatch() once! If you need to call it multiple times (or from multiple threads) you need to construct a separate DispatchProxy instance for each such case!

Field Summary
`int` | `m_pStream` Comment for `m_pStream`

Constructor Summary
`DispatchProxy(Dispatch localDispatch)` Marshals the passed in dispatch into the stream

Method Summary
`void` | `finalize()`
`void` | `safeRelease()` Finalizers call this method.
`Dispatch` | `toDispatch()`

Methods inherited from class com.jacob.com.JacobObject
`debug, getBuildDate, getBuildVersion, isDebugEnabled`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_pStream

    public int m_pStream

  Comment for `m_pStream`

Constructor Detail

### DispatchProxy

    public DispatchProxy(Dispatch localDispatch)

  Marshals the passed in dispatch into the stream

  Parameters:
    `localDispatch` -

Method Detail

### toDispatch

    public Dispatch toDispatch()

  Returns:
    Dispatch the dispatch retrieved from the stream

### finalize

    public void finalize()

  Overrides:
    `finalize` in class `Object`

### safeRelease

    public void safeRelease()

  Description copied from class: `JacobObject`
  Finalizers call this method. This method should release any COM data structures in a way that it can be called multiple times. This can happen if someone manually calls this and then a finalizer calls it.

  Overrides:
    `safeRelease` in class `JacobObject`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

http://jacob-project.sourceforge.net